package com.tfjybj.itoo.exam.model;

import com.tfjybj.itoo.exam.entity.OptionEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.List;

/**
 * QuestionModel
 * 试题表
 *
 * @author 李青松
 * @version 2.0.0
 * @since 2.0.0 2018-11-01 08:55:53
 */
@ApiModel(value = "QuestionModel:试题表")
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
public class QuestionModel implements Serializable {

    //region 模板逆向生产来自QuestionEntity的属性
    /**
     * id
     */
    @ApiModelProperty(value = "question主键")
    @Column(name = "id")
    private String id;
    /**
     * 编号
     */
    @ApiModelProperty(value = "编号", required = true, example = "0")
    private Integer serial;

    /**
     * 父试题id（适用于类似阅读理解题型的题）
     */
    @ApiModelProperty(value = "父试题id（适用于类似阅读理解题型的题）")
    private String parentId;

    /**
     * 历史题id
     */
    @ApiModelProperty(value = "历史题id")
    private String historyId;

    /**
     * 题型id
     */
    @ApiModelProperty(value = "题型id", required = true)
    private String questionTypeId;

    /**
     * 试题分类id
     */
    @ApiModelProperty(value = "试题分类id", required = true)
    private String questionClassifyId;
    /**
     * 分类名
     */
    @ApiModelProperty(value = "分类名", required = true)
    private String name;
    /**
     * 题干:字符串格式
     */
    @ApiModelProperty(value = "题干:字符串格式")
    private String questionContent;

    /**
     * 题干:HTML格式
     */
    @ApiModelProperty(value = "题干:HTML格式", required = true)
    private String questionContentHtml;

    /**
     * 版本
     */
    @ApiModelProperty(value = "版本", example = "0")
    private Integer version;

    /**
     * 答案
     */
    @ApiModelProperty(value = "答案")
    private String answer;

    /**
     * 答案Html
     */
    @ApiModelProperty(value = "答案Html")
    private String answerHtml;

    /**
     * 是否乱序(0不乱序,1乱序)
     */
    @ApiModelProperty(value = "是否乱序(0不乱序,1乱序)", example = "0")
    private Integer isOutOfOrder;

    /**
     * 是否别名（0否，1是）
     */
    @ApiModelProperty(value = "是否别名（0否，1是）", example = "0")
    private Integer isAlias;

    /**
     * 答案解析:字符串格式
     */
    @ApiModelProperty(value = "答案解析:字符串格式")
    private String analysis;

    /**
     * 答案解析:HTML格式
     */
    @ApiModelProperty(value = "答案解析:HTML格式")
    private String analysisHtml;

    /**
     * 来源(0手工,1excel导入,2word导入)
     */
    @ApiModelProperty(value = "来源(0手工,1excel导入,2word导入)", required = true, example = "0")
    private Integer source;

    /**
     * 检查状态(0未检查,1已检查)
     */
    @ApiModelProperty(value = "检查状态(0未检查,1已检查)", example = "0")
    private Integer checkStatus;

    /**
     * 检测结果
     */
    @ApiModelProperty(value = "检测结果")
    private String checkResult;

    /**
     * 难度等级初始值
     */
    @ApiModelProperty(value = "难度等级初始值", example = "0")
    private Integer degreeInitial;

    /**
     * 难度等级统计值
     */
    @ApiModelProperty(value = "难度等级统计值", example = "0")
    private Integer degreeStatistic;

    /**
     * 选项数量/填空个数
     */
    @ApiModelProperty(value = "选项数量/填空个数", example = "0")
    private Integer optionCount;

    /**
     * 是否有效（t是 f否）
     */
    @ApiModelProperty(value = "是否有效（t是 f否）", example = "0")
    private Integer isEffective;

    /**
     * 是否必须为HTML格式（0否，1是）
     */
    @ApiModelProperty(value = "是否必须为HTML格式（0否，1是）", example = "0")
    private Integer isHtml;

    /**
     * 知识点
     */
    @ApiModelProperty(value = "知识点")
    private String knowledgePoint;

    /**
     * 子题的顺序 数字来判断顺序
     */
    @ApiModelProperty(value = "子题的顺序 数字来判断顺序", example = "0")
    private Integer childOrder;

    /**
     * 课程id
     */
    @ApiModelProperty(value = "课程id",required = true)
    private String courseId;


    //endregion

    /* *****************************以下是非模板生成的内容************************************ */

    /**
     * id
     */
    @ApiModelProperty(value = "option主键")
    @Column(name = "id")
    private String optionId;
    /**
     * 历史题id
     */
    @ApiModelProperty(value = "历史题id")
    private String optionHistoryId;

    /**
     * 试题id
     */
    @ApiModelProperty(value = "试题id", required = true)
    private String questionId;

    /**
     * 选项名：HTML格式
     */
    @ApiModelProperty(value = "选项名：HTML格式", required = true)
    private String optionNameHtml;

    /**
     * 选项名：字符串格式
     */
    @ApiModelProperty(value = "选项名：字符串格式")
    private String optionName;

    /**
     * 选项是否乱序（0 否，1 是）
     * 选项是否乱序（0 否，1 是）
     */
    @ApiModelProperty(value = "选项是否乱序（0 否，1 是）", example = "0")
    private Integer optionIsOutOfOrder;


    /**
     * 操作人：字符串格式
     */
    @ApiModelProperty(value = "操作人：字符串格式")
    private String operator;

    /**
     * 统计题型个数：字符串格式
     */
    @ApiModelProperty(value = "统计题型个数：字符串格式")
    private String count;

    private List<QuestionModel> questionModel;
    private List<OptionModel> optionModel;
    private List<OptionEntity> optionEntityList;
}
